package com.example.royalchef.utils;

import android.app.Application;
import android.content.Context;
import android.os.Handler;
import android.os.Process;

public class MyApplication extends Application {
    private static Context context;//上下文
    private static Handler handler;//获得消息
    private static int myTid;//主线程id

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        handler = new Handler();
        myTid = Process.myTid();
    }

    public static Context getContext() {
        return context;
    }

    public static Handler getHandler() {
        return handler;
    }

    public static int getMyTid() {
        return myTid;
    }
}
